{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "466df0c5-b6c9-4de5-ac6b-51cf808bde02",
   "metadata": {},
   "source": [
    "# LaTeX Support"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "49f9e2d9-d59b-43b8-ac5d-00eb435c23d9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "            <div id=\"kotlin_out_0\"></div>\n",
       "            <script type=\"text/javascript\">\n",
       "                            if(!window.kotlinQueues) {\n",
       "                window.kotlinQueues = {};\n",
       "            }\n",
       "            if(!window.kotlinQueues[\"DataFrame\"]) {\n",
       "                var resQueue = [];\n",
       "                window.kotlinQueues[\"DataFrame\"] = resQueue;\n",
       "                window[\"call_DataFrame\"] = function(f) {\n",
       "                    resQueue.push(f);\n",
       "                }\n",
       "            }\n",
       "            (function (){\n",
       "                var modifiers = [(function(script) {\n",
       "    script.src = \"https://cdn.jsdelivr.net/gh/Kotlin/dataframe@3db46ccccaa1291c0627307d64133317f545e6ae/core/src/main/resources/init.js\"\n",
       "    script.type = \"text/javascript\";\n",
       "})];\n",
       "                var e = document.getElementById(\"kotlin_out_0\");\n",
       "                modifiers.forEach(function (gen) {\n",
       "                    var script = document.createElement(\"script\");\n",
       "                    gen(script)\n",
       "                    script.addEventListener(\"load\", function() {\n",
       "                        window[\"call_DataFrame\"] = function(f) {f();};\n",
       "                        window.kotlinQueues[\"DataFrame\"].forEach(function(f) {f();});\n",
       "                        window.kotlinQueues[\"DataFrame\"] = [];\n",
       "                    }, false);\n",
       "                    script.addEventListener(\"error\", function() {\n",
       "                        window[\"call_DataFrame\"] = function(f) {};\n",
       "                        window.kotlinQueues[\"DataFrame\"] = [];\n",
       "                        var div = document.createElement(\"div\");\n",
       "                        div.style.color = 'darkred';\n",
       "                        div.textContent = 'Error loading resource DataFrame';\n",
       "                        document.getElementById(\"kotlin_out_0\").appendChild(div);\n",
       "                    }, false);\n",
       "                    \n",
       "                    e.appendChild(script);\n",
       "                });\n",
       "            })();\n",
       "            </script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "                <style>\n",
       "                :root {\n",
       "    --background: #fff;\n",
       "    --background-odd: #f5f5f5;\n",
       "    --background-hover: #d9edfd;\n",
       "    --header-text-color: #474747;\n",
       "    --text-color: #848484;\n",
       "    --text-color-dark: #000;\n",
       "    --text-color-medium: #737373;\n",
       "    --text-color-pale: #b3b3b3;\n",
       "    --inner-border-color: #aaa;\n",
       "    --bold-border-color: #000;\n",
       "    --link-color: #296eaa;\n",
       "    --link-color-pale: #296eaa;\n",
       "    --link-hover: #1a466c;\n",
       "}\n",
       "\n",
       ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n",
       "    --background: #303030;\n",
       "    --background-odd: #3c3c3c;\n",
       "    --background-hover: #464646;\n",
       "    --header-text-color: #dddddd;\n",
       "    --text-color: #b3b3b3;\n",
       "    --text-color-dark: #dddddd;\n",
       "    --text-color-medium: #b2b2b2;\n",
       "    --text-color-pale: #737373;\n",
       "    --inner-border-color: #707070;\n",
       "    --bold-border-color: #777777;\n",
       "    --link-color: #008dc0;\n",
       "    --link-color-pale: #97e1fb;\n",
       "    --link-hover: #00688e;\n",
       "}\n",
       "\n",
       "p.dataframe_description {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe {\n",
       "    font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n",
       "    font-size: 12px;\n",
       "    background-color: var(--background);\n",
       "    color: var(--text-color-dark);\n",
       "    border: none;\n",
       "    border-collapse: collapse;\n",
       "}\n",
       "\n",
       "table.dataframe th, td {\n",
       "    padding: 6px;\n",
       "    border: 1px solid transparent;\n",
       "    text-align: left;\n",
       "}\n",
       "\n",
       "table.dataframe th {\n",
       "    background-color: var(--background);\n",
       "    color: var(--header-text-color);\n",
       "}\n",
       "\n",
       "table.dataframe td {\n",
       "    vertical-align: top;\n",
       "}\n",
       "\n",
       "table.dataframe th.bottomBorder {\n",
       "    border-bottom-color: var(--bold-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(odd) {\n",
       "    background: var(--background-odd);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:nth-child(even) {\n",
       "    background: var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe tbody > tr:hover {\n",
       "    background: var(--background-hover);\n",
       "}\n",
       "\n",
       "table.dataframe a {\n",
       "    cursor: pointer;\n",
       "    color: var(--link-color);\n",
       "    text-decoration: none;\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover > td a {\n",
       "    color: var(--link-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe a:hover {\n",
       "    color: var(--link-hover);\n",
       "    text-decoration: underline;\n",
       "}\n",
       "\n",
       "table.dataframe img {\n",
       "    max-width: fit-content;\n",
       "}\n",
       "\n",
       "table.dataframe th.complex {\n",
       "    background-color: var(--background);\n",
       "    border: 1px solid var(--background);\n",
       "}\n",
       "\n",
       "table.dataframe .leftBorder {\n",
       "    border-left-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightBorder {\n",
       "    border-right-color: var(--inner-border-color);\n",
       "}\n",
       "\n",
       "table.dataframe .rightAlign {\n",
       "    text-align: right;\n",
       "}\n",
       "\n",
       "table.dataframe .expanderSvg {\n",
       "    width: 8px;\n",
       "    height: 8px;\n",
       "    margin-right: 3px;\n",
       "}\n",
       "\n",
       "table.dataframe .expander {\n",
       "    display: flex;\n",
       "    align-items: center;\n",
       "}\n",
       "\n",
       "/* formatting */\n",
       "\n",
       "table.dataframe .null {\n",
       "    color: var(--text-color-pale);\n",
       "}\n",
       "\n",
       "table.dataframe .structural {\n",
       "    color: var(--text-color-medium);\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .dataFrameCaption {\n",
       "    font-weight: bold;\n",
       "}\n",
       "\n",
       "table.dataframe .numbers {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe td:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "table.dataframe tr:hover .formatted .structural, .null {\n",
       "    color: var(--text-color-dark);\n",
       "}\n",
       "\n",
       "\n",
       "                </style>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "   <div id=\"auywri\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"library\">\n",
       "       if(!window.letsPlotCallQueue) {\n",
       "           window.letsPlotCallQueue = [];\n",
       "       }; \n",
       "       window.letsPlotCall = function(f) {\n",
       "           window.letsPlotCallQueue.push(f);\n",
       "       };\n",
       "       (function() {\n",
       "           var script = document.createElement(\"script\");\n",
       "           script.type = \"text/javascript\";\n",
       "           script.src = \"https://cdn.jsdelivr.net/gh/JetBrains/lets-plot@v4.5.1/js-package/distr/lets-plot.min.js\";\n",
       "           script.onload = function() {\n",
       "               window.letsPlotCall = function(f) {f();};\n",
       "               window.letsPlotCallQueue.forEach(function(f) {f();});\n",
       "               window.letsPlotCallQueue = [];\n",
       "               \n",
       "               \n",
       "           };\n",
       "           script.onerror = function(event) {\n",
       "               window.letsPlotCall = function(f) {};\n",
       "               window.letsPlotCallQueue = [];\n",
       "               var div = document.createElement(\"div\");\n",
       "               div.style.color = 'darkred';\n",
       "               div.textContent = 'Error loading Lets-Plot JS';\n",
       "               document.getElementById(\"auywri\").appendChild(div);\n",
       "           };\n",
       "           var e = document.getElementById(\"auywri\");\n",
       "           e.appendChild(script);\n",
       "       })();\n",
       "   </script>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%useLatestDescriptors\n",
    "%use dataframe\n",
    "%use lets-plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "12bd6f55-ef7b-4979-8145-96887c3a1408",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Lets-Plot Kotlin API v.4.9.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.5.1."
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "LetsPlot.getInfo()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "28f866e5-adf8-4775-951e-0f89d52f65c3",
   "metadata": {},
   "source": [
    "## Power Degree"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b21423e2-f5fa-45d6-bb8c-b29f4c3b066b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"DlynuZ\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"DlynuZ\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"ggtitle\":{\n",
       "\"text\":\"Graph of the \\\\( y = x^3 - 100 x \\\\)\"\n",
       "},\n",
       "\"mapping\":{\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"x\",\n",
       "\"y\":\"y\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"data\":{\n",
       "\"x\":[-10.0,-9.0,-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0],\n",
       "\"y\":[0.0,171.0,288.0,357.0,384.0,375.0,336.0,273.0,192.0,99.0,0.0,-99.0,-192.0,-273.0,-336.0,-375.0,-384.0,-357.0,-288.0,-171.0,0.0]\n",
       "},\n",
       "\"position\":\"identity\",\n",
       "\"geom\":\"line\",\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"x\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"y\"\n",
       "}]\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"plot_title\":{\n",
       "\"face\":\"bold\",\n",
       "\"size\":20.0,\n",
       "\"blank\":false\n",
       "},\n",
       "\"text\":{\n",
       "\"family\":\"Times New Roman\",\n",
       "\"blank\":false\n",
       "}\n",
       "},\n",
       "\"spec_id\":\"1\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val data1 = mapOf(\"x\" to (-10..10).toList())\n",
    "letsPlot() +\n",
    "    geomFunction(data = data1, fn = { x -> x.pow(3) - 100 * x }) { x = \"x\" } +\n",
    "    ggtitle(\"\"\"Graph of the \\( y = x^3 - 100 x \\)\"\"\") +\n",
    "    theme(text = elementText(family = \"Times New Roman\"),\n",
    "          plotTitle = elementText(size = 20, face = \"bold\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "29abad5f-c78b-4ccd-b38e-979ec94e2823",
   "metadata": {},
   "source": [
    "## Subscript"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "955752f1-c671-4eb2-93a9-e96ad56968ba",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"Z5PkFT\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"Z5PkFT\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"ggtitle\":{\n",
       "\"text\":\"Per capita \\\\( CO_2 \\\\) emissions\",\n",
       "\"subtitle\":\"Carbon dioxide (\\\\( CO_2 \\\\)) emissions from fossil fuels and industry. Land-use change is not included.\"\n",
       "},\n",
       "\"mapping\":{\n",
       "\"x\":\"year\",\n",
       "\"y\":\"co2\",\n",
       "\"color\":\"country\"\n",
       "},\n",
       "\"data\":{\n",
       "\"country\":[\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"China\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"India\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United Kingdom\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"United States\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\",\"World\"],\n",
       "\"year\":[1907.0,1908.0,1909.0,1910.0,1911.0,1912.0,1913.0,1914.0,1915.0,1916.0,1917.0,1918.0,1919.0,1920.0,1921.0,1922.0,1923.0,1924.0,1925.0,1926.0,1927.0,1928.0,1929.0,1930.0,1931.0,1932.0,1933.0,1934.0,1935.0,1936.0,1937.0,1938.0,1939.0,1940.0,1941.0,1942.0,1943.0,1944.0,1945.0,1946.0,1947.0,1948.0,1949.0,1950.0,1951.0,1952.0,1953.0,1954.0,1955.0,1956.0,1957.0,1958.0,1959.0,1960.0,1961.0,1962.0,1963.0,1964.0,1965.0,1966.0,1967.0,1968.0,1969.0,1970.0,1971.0,1972.0,1973.0,1974.0,1975.0,1976.0,1977.0,1978.0,1979.0,1980.0,1981.0,1982.0,1983.0,1984.0,1985.0,1986.0,1987.0,1988.0,1989.0,1990.0,1991.0,1992.0,1993.0,1994.0,1995.0,1996.0,1997.0,1998.0,1999.0,2000.0,2001.0,2002.0,2003.0,2004.0,2005.0,2006.0,2007.0,2008.0,2009.0,2010.0,2011.0,2012.0,2013.0,2014.0,2015.0,2016.0,2017.0,2018.0,2019.0,2020.0,2021.0,2022.0,1858.0,1859.0,1860.0,1861.0,1862.0,1863.0,1864.0,1865.0,1866.0,1878.0,1879.0,1880.0,1881.0,1882.0,1883.0,1884.0,1885.0,1886.0,1887.0,1888.0,1889.0,1890.0,1891.0,1892.0,1893.0,1894.0,1895.0,1896.0,1897.0,1898.0,1899.0,1900.0,1901.0,1902.0,1903.0,1904.0,1905.0,1906.0,1907.0,1908.0,1909.0,1910.0,1911.0,1912.0,1913.0,1914.0,1915.0,1916.0,1917.0,1918.0,1919.0,1920.0,1921.0,1922.0,1923.0,1924.0,1925.0,1926.0,1927.0,1928.0,1929.0,1930.0,1931.0,1932.0,1933.0,1934.0,1935.0,1936.0,1937.0,1938.0,1939.0,1940.0,1941.0,1942.0,1943.0,1944.0,1945.0,1946.0,1947.0,1948.0,1949.0,1950.0,1951.0,1952.0,1953.0,1954.0,1955.0,1956.0,1957.0,1958.0,1959.0,1960.0,1961.0,1962.0,1963.0,1964.0,1965.0,1966.0,1967.0,1968.0,1969.0,1970.0,1971.0,1972.0,1973.0,1974.0,1975.0,1976.0,1977.0,1978.0,1979.0,1980.0,1981.0,1982.0,1983.0,1984.0,1985.0,1986.0,1987.0,1988.0,1989.0,1990.0,1991.0,1992.0,1993.0,1994.0,1995.0,1996.0,1997.0,1998.0,1999.0,2000.0,2001.0,2002.0,2003.0,2004.0,2005.0,2006.0,2007.0,2008.0,2009.0,2010.0,2011.0,2012.0,2013.0,2014.0,2015.0,2016.0,2017.0,2018.0,2019.0,2020.0,2021.0,2022.0,1750.0,1760.0,1770.0,1780.0,1790.0,1800.0,1801.0,1802.0,1803.0,1804.0,1805.0,1806.0,1807.0,1808.0,1809.0,1810.0,1811.0,1812.0,1813.0,1814.0,1815.0,1816.0,1817.0,1818.0,1819.0,1820.0,1821.0,1822.0,1823.0,1824.0,1825.0,1826.0,1827.0,1828.0,1829.0,1830.0,1831.0,1832.0,1833.0,1834.0,1835.0,1836.0,1837.0,1838.0,1839.0,1840.0,1841.0,1842.0,1843.0,1844.0,1845.0,1846.0,1847.0,1848.0,1849.0,1850.0,1851.0,1852.0,1853.0,1854.0,1855.0,1856.0,1857.0,1858.0,1859.0,1860.0,1861.0,1862.0,1863.0,1864.0,1865.0,1866.0,1867.0,1868.0,1869.0,1870.0,1871.0,1872.0,1873.0,1874.0,1875.0,1876.0,1877.0,1878.0,1879.0,1880.0,1881.0,1882.0,1883.0,1884.0,1885.0,1886.0,1887.0,1888.0,1889.0,1890.0,1891.0,1892.0,1893.0,1894.0,1895.0,1896.0,1897.0,1898.0,1899.0,1900.0,1901.0,1902.0,1903.0,1904.0,1905.0,1906.0,1907.0,1908.0,1909.0,1910.0,1911.0,1912.0,1913.0,1914.0,1915.0,1916.0,1917.0,1918.0,1919.0,1920.0,1921.0,1922.0,1923.0,1924.0,1925.0,1926.0,1927.0,1928.0,1929.0,1930.0,1931.0,1932.0,1933.0,1934.0,1935.0,1936.0,1937.0,1938.0,1939.0,1940.0,1941.0,1942.0,1943.0,1944.0,1945.0,1946.0,1947.0,1948.0,1949.0,1950.0,1951.0,1952.0,1953.0,1954.0,1955.0,1956.0,1957.0,1958.0,1959.0,1960.0,1961.0,1962.0,1963.0,1964.0,1965.0,1966.0,1967.0,1968.0,1969.0,1970.0,1971.0,1972.0,1973.0,1974.0,1975.0,1976.0,1977.0,1978.0,1979.0,1980.0,1981.0,1982.0,1983.0,1984.0,1985.0,1986.0,1987.0,1988.0,1989.0,1990.0,1991.0,1992.0,1993.0,1994.0,1995.0,1996.0,1997.0,1998.0,1999.0,2000.0,2001.0,2002.0,2003.0,2004.0,2005.0,2006.0,2007.0,2008.0,2009.0,2010.0,2011.0,2012.0,2013.0,2014.0,2015.0,2016.0,2017.0,2018.0,2019.0,2020.0,2021.0,2022.0,1800.0,1801.0,1802.0,1803.0,1804.0,1805.0,1806.0,1807.0,1808.0,1809.0,1810.0,1811.0,1812.0,1813.0,1814.0,1815.0,1816.0,1817.0,1818.0,1819.0,1820.0,1821.0,1822.0,1823.0,1824.0,1825.0,1826.0,1827.0,1828.0,1829.0,1830.0,1831.0,1832.0,1833.0,1834.0,1835.0,1836.0,1837.0,1838.0,1839.0,1840.0,1841.0,1842.0,1843.0,1844.0,1845.0,1846.0,1847.0,1848.0,1849.0,1850.0,1851.0,1852.0,1853.0,1854.0,1855.0,1856.0,1857.0,1858.0,1859.0,1860.0,1861.0,1862.0,1863.0,1864.0,1865.0,1866.0,1867.0,1868.0,1869.0,1870.0,1871.0,1872.0,1873.0,1874.0,1875.0,1876.0,1877.0,1878.0,1879.0,1880.0,1881.0,1882.0,1883.0,1884.0,1885.0,1886.0,1887.0,1888.0,1889.0,1890.0,1891.0,1892.0,1893.0,1894.0,1895.0,1896.0,1897.0,1898.0,1899.0,1900.0,1901.0,1902.0,1903.0,1904.0,1905.0,1906.0,1907.0,1908.0,1909.0,1910.0,1911.0,1912.0,1913.0,1914.0,1915.0,1916.0,1917.0,1918.0,1919.0,1920.0,1921.0,1922.0,1923.0,1924.0,1925.0,1926.0,1927.0,1928.0,1929.0,1930.0,1931.0,1932.0,1933.0,1934.0,1935.0,1936.0,1937.0,1938.0,1939.0,1940.0,1941.0,1942.0,1943.0,1944.0,1945.0,1946.0,1947.0,1948.0,1949.0,1950.0,1951.0,1952.0,1953.0,1954.0,1955.0,1956.0,1957.0,1958.0,1959.0,1960.0,1961.0,1962.0,1963.0,1964.0,1965.0,1966.0,1967.0,1968.0,1969.0,1970.0,1971.0,1972.0,1973.0,1974.0,1975.0,1976.0,1977.0,1978.0,1979.0,1980.0,1981.0,1982.0,1983.0,1984.0,1985.0,1986.0,1987.0,1988.0,1989.0,1990.0,1991.0,1992.0,1993.0,1994.0,1995.0,1996.0,1997.0,1998.0,1999.0,2000.0,2001.0,2002.0,2003.0,2004.0,2005.0,2006.0,2007.0,2008.0,2009.0,2010.0,2011.0,2012.0,2013.0,2014.0,2015.0,2016.0,2017.0,2018.0,2019.0,2020.0,2021.0,2022.0,1750.0,1760.0,1770.0,1780.0,1790.0,1800.0,1801.0,1802.0,1803.0,1804.0,1805.0,1806.0,1807.0,1808.0,1809.0,1810.0,1811.0,1812.0,1813.0,1814.0,1815.0,1816.0,1817.0,1818.0,1819.0,1820.0,1821.0,1822.0,1823.0,1824.0,1825.0,1826.0,1827.0,1828.0,1829.0,1830.0,1831.0,1832.0,1833.0,1834.0,1835.0,1836.0,1837.0,1838.0,1839.0,1840.0,1841.0,1842.0,1843.0,1844.0,1845.0,1846.0,1847.0,1848.0,1849.0,1850.0,1851.0,1852.0,1853.0,1854.0,1855.0,1856.0,1857.0,1858.0,1859.0,1860.0,1861.0,1862.0,1863.0,1864.0,1865.0,1866.0,1867.0,1868.0,1869.0,1870.0,1871.0,1872.0,1873.0,1874.0,1875.0,1876.0,1877.0,1878.0,1879.0,1880.0,1881.0,1882.0,1883.0,1884.0,1885.0,1886.0,1887.0,1888.0,1889.0,1890.0,1891.0,1892.0,1893.0,1894.0,1895.0,1896.0,1897.0,1898.0,1899.0,1900.0,1901.0,1902.0,1903.0,1904.0,1905.0,1906.0,1907.0,1908.0,1909.0,1910.0,1911.0,1912.0,1913.0,1914.0,1915.0,1916.0,1917.0,1918.0,1919.0,1920.0,1921.0,1922.0,1923.0,1924.0,1925.0,1926.0,1927.0,1928.0,1929.0,1930.0,1931.0,1932.0,1933.0,1934.0,1935.0,1936.0,1937.0,1938.0,1939.0,1940.0,1941.0,1942.0,1943.0,1944.0,1945.0,1946.0,1947.0,1948.0,1949.0,1950.0,1951.0,1952.0,1953.0,1954.0,1955.0,1956.0,1957.0,1958.0,1959.0,1960.0,1961.0,1962.0,1963.0,1964.0,1965.0,1966.0,1967.0,1968.0,1969.0,1970.0,1971.0,1972.0,1973.0,1974.0,1975.0,1976.0,1977.0,1978.0,1979.0,1980.0,1981.0,1982.0,1983.0,1984.0,1985.0,1986.0,1987.0,1988.0,1989.0,1990.0,1991.0,1992.0,1993.0,1994.0,1995.0,1996.0,1997.0,1998.0,1999.0,2000.0,2001.0,2002.0,2003.0,2004.0,2005.0,2006.0,2007.0,2008.0,2009.0,2010.0,2011.0,2012.0,2013.0,2014.0,2015.0,2016.0,2017.0,2018.0,2019.0,2020.0,2021.0,2022.0],\n",
       "\"co2\":[0.04840261,0.055020537,0.058310255,0.059680074,0.05827084,0.039898846,0.056213327,0.061269186,0.057669863,0.0676246,0.071104296,0.07631273,0.08266413,0.08693245,0.083120845,0.08528475,0.09890104,0.103484906,0.09701566,0.09184579,0.09602494,0.09940985,0.10044768,0.102641396,0.10696789,0.10303524,0.110256605,0.12636147,0.1462837,0.15108936,0.141227,0.12139731,0.14638789,0.17756674,0.22169025,0.24687532,0.20974888,0.19717897,0.1064322,0.06839545,0.078831576,0.07197712,0.11541034,0.14492334,0.184452,0.22656573,0.23170733,0.27270314,0.31578833,0.3502027,0.40600595,0.8148865,1.1042234,1.2210879,0.870845,0.69155574,0.6679004,0.65376264,0.69114995,0.73956573,0.60475963,0.634962,0.75824785,0.9822721,1.0781755,1.1226243,1.14364,1.1431363,1.2929549,1.319618,1.4225098,1.5628908,1.5756097,1.5213128,1.4805452,1.5852113,1.6461062,1.7667851,1.8845572,1.9523761,2.0583806,2.1739545,2.1717405,2.1538057,2.226241,2.306772,2.443147,2.5708385,2.7596376,2.8566484,2.8401923,2.6985002,2.8335037,2.8867998,2.929518,3.2031846,3.7560856,4.0231986,4.5077777,4.9458566,5.28453,5.639515,5.892718,6.394216,7.0241256,7.15618,7.2352104,7.218271,7.0796027,6.9656186,7.098718,7.306582,7.5401316,7.659333,7.9502664,7.992761,0.0016306345,0.0026225285,0.0026413742,0.0020357708,0.0022457154,0.0024812713,0.0023389156,0.0022912421,0.0025777572,0.0069541484,0.00661162,0.007376274,0.007152246,0.008483122,0.00935244,0.010376405,0.009273,0.010368174,0.011375812,0.012549144,0.014703918,0.016115645,0.017284762,0.018952932,0.01999356,0.020230243,0.025301976,0.027325615,0.029601838,0.03268272,0.035929587,0.042497184,0.04676396,0.051255062,0.051971376,0.05781762,0.058773577,0.067479804,0.074727364,0.08500604,0.08200695,0.07948412,0.08363586,0.09608166,0.105915904,0.10660639,0.1113691,0.11253865,0.11748533,0.13189174,0.14359692,0.11597921,0.12397458,0.12101957,0.12333363,0.13069953,0.1277203,0.12605053,0.13091344,0.12405647,0.12777013,0.1284197,0.116239466,0.10668871,0.10328146,0.11374881,0.117218636,0.1136144,0.1241089,0.136815,0.13263759,0.13995251,0.14319769,0.14351086,0.1259883,0.12979308,0.14496106,0.14425357,0.1479919,0.14916655,0.15787825,0.1711455,0.17544037,0.1807685,0.1802199,0.18580393,0.1976721,0.20030674,0.2197831,0.22476363,0.23273039,0.24963316,0.26384085,0.2838858,0.29804167,0.2852175,0.3073336,0.31188983,0.30567008,0.32631966,0.32534125,0.32595912,0.33677888,0.34835753,0.35076737,0.35401908,0.37562153,0.38394982,0.39737216,0.39496067,0.40555653,0.4186269,0.4418288,0.44623372,0.4722262,0.47393072,0.5095753,0.5343033,0.5582126,0.5897501,0.63455755,0.66401815,0.69224447,0.72219676,0.7311473,0.7554136,0.7886323,0.8376247,0.8560122,0.85739446,0.9134644,0.92251354,0.91843957,0.9302123,0.9478657,0.9901711,1.026879,1.102451,1.1704763,1.2342707,1.3175575,1.3520223,1.4032146,1.5109605,1.5452317,1.6434114,1.6889228,1.7589977,1.7919174,1.8941209,1.8891369,1.7341554,1.8998938,1.9966822,1.0019125,1.0703607,1.2627978,1.4520403,1.7707862,2.9153564,2.8286498,2.7656965,2.5437405,2.4763212,2.5825114,2.695625,2.811327,2.8766963,2.915259,2.8722124,2.8188872,2.7279038,2.6192143,2.5276635,2.4391406,2.3177464,2.3279696,2.303634,2.1739373,2.0557053,2.0387487,2.0682518,2.1145442,2.1529691,2.1886015,2.1842163,2.2401965,2.2364638,2.234891,2.8095102,2.6452432,2.5387402,2.4873807,2.6161683,2.8411562,3.0594063,2.9013233,2.8080924,2.8675888,3.0363529,3.0412488,3.1750915,3.2955952,3.490339,3.7006795,3.5360403,3.7643142,4.0223227,4.3204474,4.489172,4.252994,4.2159934,4.167399,4.9915624,4.6457763,4.969304,4.8508296,4.7254786,5.21251,5.8072352,6.007872,5.7708826,6.086277,6.4942226,6.8250237,6.974182,7.1007743,6.907395,7.185026,7.273863,7.6345577,7.967353,8.189286,7.8809423,8.238478,8.144492,8.210754,7.9860015,7.9602866,8.59724,8.958958,8.960591,9.250244,8.935579,8.759362,8.611424,8.762649,9.038788,9.284015,9.419005,9.533845,9.25243,8.21112,9.315627,9.317141,9.494172,9.656031,9.589032,10.180933,10.215249,9.90617,10.200084,10.190824,10.149534,10.193703,10.467203,10.839091,10.481716,10.493224,10.50297,10.698935,10.082025,10.975125,10.597855,10.691779,11.030396,10.85709,10.07166,9.811919,10.109585,6.8650475,9.199885,9.793026,10.268194,9.720287,5.336817,10.131132,9.519176,10.026679,9.592651,8.945306,8.560332,8.4369135,9.059344,9.139739,9.617228,9.871369,9.419319,9.447781,9.876443,9.72016,9.66495,9.338569,9.040819,8.508798,8.851512,9.325638,9.577528,9.731059,10.004824,10.846073,10.472578,10.649034,10.849724,11.270068,11.168912,11.042717,10.706449,10.463034,11.115082,11.135089,11.148759,11.276441,11.285723,11.471816,11.328242,10.788927,10.99323,11.338446,11.726424,11.818837,11.560065,11.743219,10.975319,10.72118,10.63796,10.7451935,10.752227,11.454919,10.280013,9.939641,9.711942,9.654327,9.353447,9.879896,10.023534,10.059909,10.013473,10.1894865,10.521594,10.624451,10.326097,10.054433,9.933512,9.773094,10.102876,9.660194,9.728953,9.57871,9.669214,9.780857,9.439251,9.5829115,9.557823,9.4452305,9.338998,9.134187,8.825938,7.938317,8.156536,7.422031,7.6396565,7.4275928,6.774484,6.4770393,6.0837545,5.8634415,5.7159815,5.4621234,4.8652816,5.164383,4.7201805,0.042136,0.043749023,0.046463702,0.04675338,0.051547863,0.05170035,0.049647022,0.055148073,0.056223534,0.05672419,0.057195846,0.05957973,0.0625836,0.06519789,0.06802918,0.070616506,0.07547438,0.079147205,0.08329477,0.0788342,0.07940742,0.08064995,0.08181233,0.08290245,0.09074809,0.09872902,0.111148365,0.11888613,0.12727666,0.13939415,0.15767905,0.16626401,0.21589011,0.2451494,0.22857675,0.28379282,0.30255765,0.33012334,0.3045117,0.3247494,0.3359056,0.34518078,0.37302932,0.40623948,0.47249264,0.5519618,0.6075555,0.6989572,0.7553745,0.79568434,0.83870095,1.0133029,1.0699053,1.1693825,1.2480785,1.394424,1.4202958,1.4139436,1.3925428,1.4731518,1.5011375,1.4090402,1.4285618,1.6126716,1.6866376,1.6529324,1.6266301,1.9555545,2.1599026,2.401964,2.4715502,2.524375,3.0265274,3.2694678,3.0782638,3.0432105,2.912211,3.1561265,3.0182126,3.5994267,3.986088,4.1242743,4.517172,4.764769,4.911519,4.885538,5.0466657,5.2776074,6.2780514,5.5148797,6.468085,6.7461,6.9749255,6.9034314,6.3442984,7.033352,6.918819,7.067037,7.563029,8.516529,8.856599,9.463163,9.83929,11.294751,10.9292755,11.993248,12.352037,14.090626,12.090888,13.149926,14.104886,13.743023,14.455241,15.308516,13.795953,14.121179,15.469336,16.785204,17.309261,14.442194,16.730282,13.506341,13.424879,17.478342,15.423299,15.735723,16.812035,16.192951,15.685378,16.603048,14.58597,12.289558,10.321664,10.991698,11.621933,11.991493,13.672,14.204154,11.926593,13.037762,14.487894,15.615902,16.58958,16.911407,17.948437,17.084375,16.121332,17.508738,17.940481,14.822593,17.139591,17.388702,16.68099,16.808949,15.735587,16.932928,17.432253,16.985847,16.145485,16.33884,16.444399,16.11992,16.457443,16.931978,17.430368,17.920338,18.617542,19.12176,19.622215,20.39401,21.662867,21.514513,22.28148,23.08134,22.081156,21.196472,22.262001,22.696455,22.679413,22.718729,21.549501,20.76817,19.505571,19.225763,20.029423,19.786129,19.634436,20.11944,20.845224,20.951706,20.642052,20.126223,20.277145,20.375822,20.452991,20.421772,20.867321,20.881931,20.785181,20.789043,21.282457,20.694746,20.621824,20.645628,20.79503,20.658026,20.192238,20.248577,19.349745,17.76503,18.25202,17.669733,16.876879,17.158995,17.168007,16.562983,16.053692,15.804429,16.191355,15.739861,14.034053,14.9324875,14.949616,0.012480065,0.013481781,0.015995078,0.017820267,0.02189629,0.033286307,0.032386728,0.04067251,0.029698573,0.031827636,0.031196972,0.032529123,0.035875093,0.035049245,0.03574179,0.03861839,0.03910187,0.039486334,0.039604392,0.040314633,0.041331157,0.042843517,0.04607607,0.047710717,0.046950724,0.04639832,0.047355454,0.048832577,0.050612494,0.051373772,0.053823054,0.05403541,0.05747962,0.057907857,0.0572159,0.07627875,0.07101679,0.06967444,0.070330165,0.07464083,0.08151876,0.08904739,0.08804953,0.08733766,0.09005479,0.097056426,0.0994163,0.104824804,0.10675982,0.11398057,0.12393704,0.12545872,0.1352484,0.13686027,0.14522752,0.15385547,0.1551192,0.1616655,0.16903472,0.1983029,0.20197801,0.21502298,0.21674007,0.21971354,0.23261489,0.2545674,0.26710698,0.27152237,0.28880972,0.310433,0.3285574,0.33789563,0.360665,0.36957112,0.3909979,0.39751005,0.4210403,0.463626,0.4899655,0.45645648,0.4924599,0.49678734,0.5038972,0.50514203,0.5378026,0.6031159,0.62059504,0.6510816,0.68749815,0.69031864,0.69036317,0.6959667,0.7253166,0.7970655,0.79146993,0.85456306,0.88967717,0.89069086,0.87403756,0.8988176,0.946655,0.97138184,1.0107269,1.0588747,1.1484411,1.199232,1.2307372,1.2517458,1.3532422,1.3571923,1.432905,1.4836785,1.676299,1.5976069,1.6497104,1.716262,1.73124,1.8065919,1.9446292,1.7521608,1.7155751,1.8405812,1.9117817,1.8731953,1.6123312,1.8576044,1.6189123,1.683432,1.893368,1.8824672,1.8860849,1.8362813,1.9864538,1.9602886,2.084881,1.9021566,1.6854303,1.5044751,1.5680304,1.6880137,1.7537812,1.9043846,2.014623,1.8747287,1.9639443,2.122051,2.153978,2.1315649,2.15036,2.1663656,1.7885866,1.9376519,2.1292646,2.2258415,2.103328,2.37238,2.5092719,2.4968188,2.5189998,2.522121,2.7107303,2.829694,2.8642392,2.8864362,2.9810743,3.1088755,3.0682025,3.1172154,3.2123766,3.3127992,3.389065,3.4821656,3.5207915,3.6382928,3.800649,4.031552,4.111967,4.2195787,4.357756,4.257117,4.1897635,4.341634,4.387014,4.444167,4.4903517,4.38398,4.2029867,4.094062,4.0465407,4.112731,4.176523,4.163081,4.21461,4.30166,4.2841187,4.2799,4.296785,4.1085906,4.087606,4.0692253,4.096046,4.163014,4.13037,4.0637503,4.0926967,4.147293,4.1206822,4.1582055,4.324224,4.4195943,4.5122457,4.6083193,4.683315,4.704022,4.565362,4.7678533,4.8686357,4.878096,4.8592534,4.8325562,4.775163,4.719525,4.740302,4.7850013,4.770166,4.4647303,4.654845,4.658219]\n",
       "},\n",
       "\"ggsize\":{\n",
       "\"width\":1000.0,\n",
       "\"height\":400.0\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"x\",\n",
       "\"name\":\"\",\n",
       "\"format\":\"d\"\n",
       "},{\n",
       "\"aesthetic\":\"y\",\n",
       "\"expand\":[0,0],\n",
       "\"name\":\"\",\n",
       "\"format\":\"{d} t\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"position\":\"identity\",\n",
       "\"geom\":\"line\",\n",
       "\"tooltips\":{\n",
       "\"formats\":[{\n",
       "\"field\":\"year\",\n",
       "\"format\":\"d\"\n",
       "},{\n",
       "\"field\":\"@co2\",\n",
       "\"format\":\"{.1f} t\"\n",
       "}],\n",
       "\"title\":\"@year\\nin tonnes per person\",\n",
       "\"lines\":[\"@country: @co2\"]\n",
       "},\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"caption\":{\n",
       "\"text\":\"<a href=\\\"https://ourworldindata.org/explorers/co2?facet=none&hideControls=false&Gas+or+Warming=CO%E2%82%82&Accounting=Production-based&Fuel+or+Land+Use+Change=All+fossil+emissions&Count=Per+capita&country=CHN~USA~IND~GBR~OWID_WRL\\\">Original plot</a>\"\n",
       "},\n",
       "\"theme\":{\n",
       "\"plot_title\":{\n",
       "\"face\":\"bold\",\n",
       "\"size\":20.0,\n",
       "\"blank\":false\n",
       "},\n",
       "\"text\":{\n",
       "\"family\":\"Playfair Display\",\n",
       "\"blank\":false\n",
       "}\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"country\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"code\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"year\"\n",
       "},{\n",
       "\"type\":\"float\",\n",
       "\"column\":\"co2\"\n",
       "}]\n",
       "},\n",
       "\"spec_id\":\"2\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val df = DataFrame.readCSV(\"https://raw.githubusercontent.com/JetBrains/lets-plot-docs/\" +\n",
    "                           \"refs/heads/master/data/co-emissions-per-capita.csv\")\n",
    "    .rename(\"Entity\", \"Code\", \"Year\", \"Annual CO₂ emissions (per capita)\")\n",
    "        .into(\"country\", \"code\", \"year\", \"co2\")\n",
    "    .filter { \"country\"<String>() in setOf(\"World\", \"United States\", \"United Kingdom\", \"China\", \"India\") }\n",
    "val dataMap = df.toMap()\n",
    "\n",
    "letsPlot(dataMap) { x = \"year\"; y = \"co2\"; color = \"country\" } +\n",
    "    geomLine(tooltips = layerTooltips().title(\"@year\\nin tonnes per person\").format(\"year\", \"d\")\n",
    "                                       .line(\"@country: @co2\").format(\"@co2\", \"{.1f} t\")) +\n",
    "    scaleXContinuous(name = \"\", format = \"d\") +\n",
    "    scaleYContinuous(name = \"\", format = \"{d} t\", expand = listOf(0, 0)) +\n",
    "    labs(\"\"\"Per capita \\( CO_2 \\) emissions\"\"\",\n",
    "         \"\"\"Carbon dioxide (\\( CO_2 \\)) emissions from fossil fuels and industry. \"\"\" +\n",
    "         \"Land-use change is not included.\",\n",
    "         \"<a href=\\\"https://ourworldindata.org/explorers/co2?facet=none&hideControls=false&Gas+or+Warming=CO%E2%82%82&Accounting=Production-based&Fuel+or+Land+Use+Change=All+fossil+emissions&Count=Per+capita&country=CHN~USA~IND~GBR~OWID_WRL\\\">Original plot</a>\") +\n",
    "    ggsize(1000, 400) +\n",
    "    theme(text = elementText(family = \"Playfair Display\"),\n",
    "          plotTitle = elementText(size = 20, face = \"bold\"))"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9c4f6f75-e693-4e58-a2cf-73c1e5440295",
   "metadata": {},
   "source": [
    "## Greek Letters and Other Special Symbols"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "96adda5f-524c-47ab-a9cc-c6e6b21bc5b9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"BlWOzT\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"BlWOzT\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"mapping\":{\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"size\":70.0,\n",
       "\"x\":0.0,\n",
       "\"position\":\"identity\",\n",
       "\"label\":\"\\\\( e^{i \\\\cdot \\\\pi} = -1 \\\\)\",\n",
       "\"geom\":\"text\",\n",
       "\"family\":\"Computer Modern Math\",\n",
       "\"fontface\":\"italic\",\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"name\":\"classic\",\n",
       "\"axis\":{\n",
       "\"blank\":true\n",
       "},\n",
       "\"line\":{\n",
       "\"blank\":true\n",
       "}\n",
       "},\n",
       "\"spec_id\":\"3\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "letsPlot() +\n",
    "    geomText(x = 0, label = \"\"\"\\( e^{i \\cdot \\pi} = -1 \\)\"\"\",\n",
    "             size = 70, family = \"Computer Modern Math\", fontface = \"italic\") +\n",
    "    themeVoid()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b2b40d61-315e-4b23-b6fc-44995945ee39",
   "metadata": {},
   "source": [
    "## Place Your Formulas Anywhere!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "b0843404-c499-4929-864d-5d469eee59de",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "   <div id=\"Qt0ruM\"></div>\n",
       "   <script type=\"text/javascript\" data-lets-plot-script=\"plot\">\n",
       "   \n",
       "   (function() {\n",
       "   // ----------\n",
       "   \n",
       "   var containerDiv = document.getElementById(\"Qt0ruM\");\n",
       "   var observer = new ResizeObserver(function(entries) {\n",
       "       for (let entry of entries) {\n",
       "           var width = containerDiv.clientWidth\n",
       "           if (entry.contentBoxSize && width > 0) {\n",
       "           \n",
       "               // Render plot\n",
       "               if (observer) {\n",
       "                   observer.disconnect();\n",
       "                   observer = null;\n",
       "               }\n",
       "\n",
       "               var plotSpec={\n",
       "\"mapping\":{\n",
       "},\n",
       "\"guides\":{\n",
       "\"x\":{\n",
       "\"title\":\"\\\\(\\\\sigma\\\\)\"\n",
       "}\n",
       "},\n",
       "\"data\":{\n",
       "\"f\":[\"\\\\( A \\\\neq B^2 \\\\)\"],\n",
       "\"\\\\(\\\\delta\\\\)\":[1.0],\n",
       "\"x\":[\"\\\\( \\\\Omega_{\\\\rho + 1} \\\\)\"]\n",
       "},\n",
       "\"kind\":\"plot\",\n",
       "\"scales\":[{\n",
       "\"aesthetic\":\"fill\",\n",
       "\"values\":[\"#6a3d9a\"],\n",
       "\"name\":\"\\\\(\\\\Sigma\\\\)\"\n",
       "}],\n",
       "\"layers\":[{\n",
       "\"mapping\":{\n",
       "\"x\":\"x\",\n",
       "\"y\":\"\\\\(\\\\delta\\\\)\",\n",
       "\"fill\":\"x\"\n",
       "},\n",
       "\"stat\":\"identity\",\n",
       "\"position\":\"stack\",\n",
       "\"geom\":\"bar\",\n",
       "\"tooltips\":{\n",
       "\"lines\":[\"@f\"]\n",
       "},\n",
       "\"labels\":{\n",
       "\"lines\":[\"@f\"]\n",
       "},\n",
       "\"data\":{\n",
       "}\n",
       "}],\n",
       "\"theme\":{\n",
       "\"label_text\":{\n",
       "\"size\":20.0,\n",
       "\"blank\":false\n",
       "}\n",
       "},\n",
       "\"data_meta\":{\n",
       "\"series_annotations\":[{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"x\"\n",
       "},{\n",
       "\"type\":\"int\",\n",
       "\"column\":\"\\\\(\\\\delta\\\\)\"\n",
       "},{\n",
       "\"type\":\"str\",\n",
       "\"column\":\"f\"\n",
       "}]\n",
       "},\n",
       "\"spec_id\":\"4\"\n",
       "};\n",
       "               window.letsPlotCall(function() {\n",
       "       \n",
       "               var toolbar = null;\n",
       "               var plotContainer = containerDiv;               \n",
       "               \n",
       "                   var options = {\n",
       "                       sizing: {\n",
       "                           width_mode: \"min\",\n",
       "                           height_mode: \"scaled\",\n",
       "                           width: width\n",
       "                       }\n",
       "                   };\n",
       "                   var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n",
       "                   if (toolbar) {\n",
       "                     toolbar.bind(fig);\n",
       "                   }\n",
       "               });\n",
       "               \n",
       "               break;\n",
       "           }\n",
       "       }\n",
       "   });\n",
       "   \n",
       "   observer.observe(containerDiv);\n",
       "   \n",
       "   // ----------\n",
       "   })();\n",
       "   \n",
       "   </script>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "val data2 = mapOf(\n",
    "    \"x\" to listOf(\"\"\"\\( \\Omega_{\\rho + 1} \\)\"\"\"),\n",
    "    \"\"\"\\(\\delta\\)\"\"\" to listOf(1),\n",
    "    \"f\" to listOf(\"\"\"\\( A \\neq B^2 \\)\"\"\"),\n",
    ")\n",
    "\n",
    "letsPlot(data2) +\n",
    "    geomBar(stat = Stat.identity,\n",
    "            labels = layerLabels().line(\"@f\"),\n",
    "            tooltips = layerTooltips().line(\"@f\"))\n",
    "        { x = \"x\"; y = \"\"\"\\(\\delta\\)\"\"\"; fill = \"x\" } +\n",
    "    scaleFillManual(listOf(\"#6a3d9a\"), name = \"\"\"\\(\\Sigma\\)\"\"\") +\n",
    "    xlab(\"\"\"\\(\\sigma\\)\"\"\") +\n",
    "    theme(labelText = elementText(size = 20))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Kotlin",
   "language": "kotlin",
   "name": "kotlin"
  },
  "language_info": {
   "codemirror_mode": "text/x-kotlin",
   "file_extension": ".kt",
   "mimetype": "text/x-kotlin",
   "name": "kotlin",
   "nbconvert_exporter": "",
   "pygments_lexer": "kotlin",
   "version": "1.9.23"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
